#include "Game Factory.h"
#include "Building.h"
#include "Vector2D.h"

#include "Mage.h"
#include "Hut.h"

GameFactory* GameFactory::Instance()
{
	static GameFactory instance;
	return &instance;
}

Character* GameFactory::CreateCharacter(GameCharacterID id, Vector2D pos)
{
	assert(pos.x >= 0 && pos.y >= 0 && "INVALID POSITION PASSED");


	switch(id)
	{
	case MageID:
	{
		return new Mage(pos);
		break;
	}

	default:
		assert(0 && "INVALID GameCharacterID!");
		break;
	}
}

Building* GameFactory::CreateBuilding(GameBuildingID id, Vector2D pos)
{
	assert(pos.x >= 0 && pos.y >= 0 && "INVALID POSITION PASSED");

	switch(id)
	{
	case HutID:
			return new Hut(pos);
			break;

	default:
		assert(0 && "INVALID GameBuildingID!");
		break;
	}
}
